package com.ruoyi.client.service.impl;

import com.ruoyi.client.domain.SysHoldStock;
import com.ruoyi.client.mapper.SysHoldStockMapper;
import com.ruoyi.client.service.ISysHoldStockService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SysHoldStockServiceImpl implements ISysHoldStockService {
    @Autowired
    SysHoldStockMapper sysHoldStockMapper;
    @Override
    public SysHoldStock getStockBySymbol(String symbol) {
        return sysHoldStockMapper.getStockBySymbol(symbol);
    }

    @Override
    public void add(SysHoldStock sysHoldStock) {
        sysHoldStockMapper.add(sysHoldStock);
    }

    @Override
    public void updateNumById(Integer num, String symbol) {
        sysHoldStockMapper.updateNumById(num,symbol);
    }

    @Override
    public List<SysHoldStock> listAll() {
        return sysHoldStockMapper.listAll();
    }

    @Override
    public SysHoldStock getStockBySymbolAndId(String symbol, Integer id) {
        return sysHoldStockMapper.getStockBySymbolAndId(symbol,id);
    }
}
